<template>
  <div class="re-draw">
    <el-button type="primary" @click="clickHandle">新增图纸</el-button>
    <el-dialog :visible.sync="visible" width="80vw" title="新增图纸" :close-on-click-modal="false">
      <div class="body">
        <RelevanceDrawing checkbox title="待选选图纸" @selection-change="selectionChange" />
        <RelevanceDrawing :data="selection" title="已选图纸" />
        <div class="btn-container">
          <el-button type="primary">确定</el-button>
          <el-button type="primary" @click="clickHandle">取消</el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import RelevanceDrawing from '../../../components/relevanceDrawing'
export default {
  name: 'ReDraw',
  components: {
    RelevanceDrawing
  },
  data() {
    return {
      visible: false,
      selections: []
    }
  },
  methods: {
    clickHandle() {
      this.visible = !this.visible
    },
    selectionChange(v) {
      this.selections = v
    }
  }
}
</script>
<style lang="scss" scoped>
.re-draw{
  display: inline-block;
  margin-right: 10px;
  .body{
    margin-top: -20px;
  }
}
</style>
